<template>
  <view class="lookimg">
    	<swiper class="swiper" :current="curr"  @animationfinish="swChang" circular>
				<swiper-item  v-for="item in showList">
					<view class="swiper-item uni-bg-red">{{item}}</view>
				</swiper-item>
			</swiper>
  </view>
</template>

<script>
export default {
  data(){
    return {
      curr:0,
      showInd:0,
      showList:[],//当前显示的滑块
      list:[]
    }
  },
  methods:{
    swChang(e){
      console.log(e.detail.current == 0 &&  this.showInd != this.showList.length)
        if(e.detail.current == 19 &&  this.showInd != this.showList.length){
          this.showInd ++;
          this.showList =  this.list[this.showInd];
          console.log(this.showList, this.list[this.showInd],this.showInd);
          this.curr = 0;
        }
    },
    init(){
      let fastChat = ['A','B','C','D','E','F','G'];
      for(let key in fastChat){
        let arr = [];
        for(let i = 0;i < 20;i++){
          arr.push(fastChat[key]+i);
        }
        this.list.push(arr);
      }
      console.log(this.list);

      this.showList = this.list[0];
      
      console.log(this.showList)
    }
  },
  onLoad(args) {
    this.init();
  },
}
</script>

<style lang="scss">
.lookimg{
  height: 100vh;
  width: 100%vw;
}
.swiper{
  height: 100vh;
  width: 100vw;
}
</style>